package com.ketangpai.mapper;

import com.ketangpai.entity.Student;
import com.ketangpai.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author jiahao
 * @date 2024/2/8 21:42
 */
public interface LoginMapper {
    @Select("select * from user where account = #{account}")
    User getUser(@Param("account") int account);
    @Select("select * from student where saccount = #{saccount} and spassword = #{spassword}")
    Student getStudent(@Param("saccount") int saccount,@Param("spassword") String spassword);
    @Select("select * from teacher where taccount = #{taccount} and tpassword = #{tpassword}")
    Student getTeacher(@Param("taccount") int taccount,@Param("tpassword") String tpassword);
}
